<?php
	require ("classAdmin.php");
	$adminObject=new admin();
	$Cat=$adminObject->Cat('',-1);
	if(isset($_POST['btnOK']))
	{
		$adminObject->InsertSubCat();
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
#InsertSubCat{ margin:0px; padding:0px;}
form{ width:500px; margin:40px auto;}
legend{ font-size:16px; font-weight:bold; color:#222222; margin-bottom:5px;}
form div{ margin-bottom:10px;}
label { width:150px; float:left; clear:left; padding-left:5px;}
#btnSend{ margin:20px 0px 0px 150px;}
</style>
</head>
<body>
	<div id="InserSubCat">
    	<form id="frmInserSubCat" action="" method="post">
        	<fieldset>
            	<legend>Thêm loại tin</legend>
                	<div>
                    	<label for="NameSubCat">Tên loại tin:</label>
                        <input type="text" id="NameSubCat" name="NameSubCat" />
                    </div>
                    <div>
                    	<label for="Order">Thứ tự:</label>
                        <input type="text" id="Order" name="Order" />
                    </div>
                    <div>
                    	<label for="Active">Ẩn hiện (active):</label>
                        <input type="radio" value="0" id="0" name="Active" />Hidden
                        <input type="radio" value="1" id="1" name="Active" />Show
                    </div>
                    <div>
                    	<label for="Cat">Thể loại:</label>
                        <select name="idTL">
                        <?php while($rowCat=mysql_fetch_assoc($Cat)){
						 ?>
                        	<option value="<?=$rowCat['idTL']; ?>"><?=$rowCat['TenTL']; ?></option>
                         <?php }?>
                        </select>
                    </div>
                    <div id="btnSend">
                    	<input type="reset" value="Reset"/>
                        <input type="submit" value="OK" name="btnOK"/>
                    </div>
            </fieldset>
        </form>
    </div>
</body>
</html>